home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / cpalette.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-06-04  |  5.9 KB  |  231 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.                           cpalette.h  -  description
  9.                              -------------------
  10.     begin                : Wed Apr 25 2001
  11.     copyright            : (C) 2001 by Franz Schmid
  12.     email                : Franz.Schmid@altmuehlnet.de
  13.  ***************************************************************************/
  14.  
  15. /***************************************************************************
  16.  *                                                                         *
  17.  *   This program is free software; you can redistribute it and/or modify  *
  18.  *   it under the terms of the GNU General Public License as published by  *
  19.  *   the Free Software Foundation; either version 2 of the License, or     *
  20.  *   (at your option) any later version.                                   *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. #ifndef CPALETTE_H
  25. #define CPALETTE_H
  26.  
  27. #include <QWidget>
  28. #include <QPointer>
  29. class QComboBox;
  30. class QCheckBox;
  31. class QEvent;
  32. class QFrame;
  33. class QGridLayout;
  34. class QGroupBox;
  35. class QHBoxLayout;
  36. class QLabel;
  37. class QListWidget;
  38. class QListWidgetItem;
  39. class QPixmap;
  40. class QSpacerItem;
  41. class QSpinBox;
  42. class QToolButton;
  43. class QVBoxLayout;
  44. #include "scribusapi.h"
  45. #include "gradienteditor.h"
  46. #include "scribusdoc.h"
  47. #include "scrpalettebase.h"
  48.  
  49. class PageItem;
  50. class ColorListBox;
  51. class ScrSpinBox;
  52. class ScComboBox;
  53. class ScPattern;
  54. class LinkButton;
  55.  
  56. /**
  57.   *@author Franz Schmid
  58.   */
  59.  
  60. class SCRIBUS_API GradientVectorDialog : public ScrPaletteBase
  61. {
  62.     Q_OBJECT
  63.  
  64. public:
  65.     GradientVectorDialog( QWidget* parent);
  66.     ~GradientVectorDialog() {};
  67.     virtual void changeEvent(QEvent *e);
  68.  
  69. public slots:
  70.     void languageChange();
  71.     void setValues(double x1, double y1, double x2, double y2);
  72.     void changeSpecial();
  73.     void unitChange(int unitIndex);
  74.  
  75. signals:
  76.     void NewSpecial(double, double, double, double);
  77.  
  78. protected:
  79.     QGridLayout* freeGradientLayout;
  80.     QLabel* GTextX1;
  81.     QLabel* GTextY1;
  82.     QLabel* GTextX2;
  83.     QLabel* GTextY2;
  84.     ScrSpinBox* gY1;
  85.     ScrSpinBox* gX2;
  86.     ScrSpinBox* gX1;
  87.     ScrSpinBox* gY2;
  88. };
  89.  
  90. class SCRIBUS_API Cpalette : public QWidget
  91. {
  92.     Q_OBJECT
  93.  
  94.     friend class PropertiesPalette;
  95.  
  96. public:
  97.     Cpalette(QWidget* parent);
  98.     ~Cpalette() {};
  99.     
  100.     virtual void changeEvent(QEvent *e);
  101.  
  102.     void setDocument(ScribusDoc* doc);
  103.     void setCurrentItem(PageItem* item);
  104.     void updateFromItem();
  105.  
  106. public slots:
  107.     void editLineColorSelectorButton();
  108.     void editFillColorSelectorButton();
  109.     void SetColors(ColorList newColorList);
  110.     void updateCList();
  111.     void SetPatterns(QMap<QString, ScPattern> *docPatterns);
  112.     void selectPattern(QListWidgetItem *c);
  113.     void changePatternProps();
  114.     void ToggleKette();
  115.     void HChange();
  116.     void VChange();
  117.     void updatePatternList();
  118.     void updateBoxS(QString Farbe);
  119.     void selectColor(QListWidgetItem *c);
  120.     QColor setColor(QString farbe, int shad);
  121.     void slotGrad(int nr);
  122.     void slotColor(QString n, int s);
  123.     void ChooseGrad(int nr);
  124.     void setActFarben(QString p, QString b, int shp, int shb);
  125.     void setActGradient(int typ);
  126.     void setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation);
  127.     void setSpecialGradient(double x1, double y1, double x2, double y2);
  128.     void editGradientVector();
  129.     void setActiveGradDia(bool active);
  130.     void setActShade();
  131.     void setActTrans(double, double);
  132.     void changeBlendMode(int);
  133.     void setActBlend(int, int);
  134.     void setGradTrans(double val);
  135.     void slotTrans(int val);
  136.     void unitChange(double old, double neww, int ein);
  137.     void languageChange();
  138.     void ToggleColorDisplay();
  139.  
  140. signals:
  141.     void NewPen(QString);
  142.     void NewBrush(QString);
  143.     void NewPenShade(int);
  144.     void NewBrushShade(int);
  145.     void NewGradient(int);
  146.     void NewPattern(QString);
  147.     void NewPatternProps(double, double, double, double, double);
  148.     void NewSpecial(double, double, double, double);
  149.     void NewTrans(double);
  150.     void NewTransS(double);
  151.     void NewBlend(int);
  152.     void NewBlendS(int);
  153.     void modeChanged();
  154.     void gradientChanged();
  155.     void editGradient();
  156.  
  157. protected:
  158.     QVBoxLayout* Form1Layout;
  159.     QHBoxLayout* Layout1;
  160.     QGridLayout* Layout1t;
  161.     QVBoxLayout* GradLayout;
  162. //    QGridLayout* freeGradientLayout;
  163.     QPixmap alertIcon;
  164.     QPixmap cmykIcon;
  165.     QPixmap rgbIcon;
  166.     QPixmap spotIcon;
  167.     QPixmap regIcon;
  168.  
  169.     ColorListBox *colorListQLBox;
  170.     QFrame* patternFrame;
  171.     QListWidget *patternBox;
  172.     QGroupBox* groupOffset;
  173.     QLabel* textLabel1;
  174.     ScrSpinBox* spinXoffset;
  175.     QLabel* textLabel2;
  176.     ScrSpinBox* spinYoffset;
  177.     QGroupBox* groupScale;
  178.     QLabel* textLabel5;
  179.     ScrSpinBox* spinXscaling;
  180.     QLabel* textLabel6;
  181.     ScrSpinBox* spinYscaling;
  182.     LinkButton* keepScaleRatio;
  183.     QGroupBox* groupRotation;
  184.     QLabel* textLabel7;
  185.     ScrSpinBox* spinAngle;
  186.     QVBoxLayout* frame3Layout;
  187.     QHBoxLayout* groupOffsetLayout;
  188.     QGridLayout* groupScaleLayout;
  189.     QHBoxLayout* groupRotationLayout;
  190.  
  191.     QToolButton *editLineColorSelector;
  192.     QToolButton *editFillColorSelector;
  193.     QSpinBox *PM1;
  194.     QComboBox* gradientQCombo;
  195.     GradientEditor* gradEdit;
  196.     GradientVectorDialog* CGradDia;
  197. /*    QFrame* freeGradientQFrame;
  198.     QLabel* GTextX1;
  199.     QLabel* GTextY1;
  200.     QLabel* GTextX2;
  201.     QLabel* GTextY2;
  202.     ScrSpinBox* gY1;
  203.     ScrSpinBox* gX2;
  204.     ScrSpinBox* gX1;
  205.     ScrSpinBox* gY2; */
  206.     QToolButton *gradEditButton;
  207.     QLabel* TransTxt;
  208.     QLabel* TransTxt2;
  209.     QLabel* ShadeTxt;
  210.     QGroupBox* TransGroup;
  211.     QSpinBox* TransSpin;
  212.     QPointer<ScribusDoc> currentDoc;
  213.     PageItem* currentItem;
  214.     ScComboBox* blendMode;
  215.     int Mode;
  216.     QString sFarbe;
  217.     ColorList colorList;
  218.     QMap<QString, ScPattern> *patternList;
  219.     bool CSichtbar;
  220.     QString Color;
  221.     int Shade;
  222.     QString Color3;
  223.     int Shade3;
  224.     bool GradientMode;
  225.     int currentGradient;
  226.     QSpacerItem *selectorQSpacer;
  227.     QCheckBox* displayAllColors;
  228. };
  229.  
  230. #endif
  231.